package com.qls.web.modules.ht.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qls.core.entity.HtHotel;
import com.qls.web.common.utils.PageUtils;
import com.qls.web.common.utils.Query;
import com.qls.web.modules.ht.dao.HtHotelinfoDao;
import com.qls.web.modules.ht.service.HtHotelinfoService;
import com.qls.web.modules.vo.HotelCityVO;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * @author doyoung
 */
@Service("htHotelinfoService")
public class HtHotelinfoServiceImpl extends ServiceImpl<HtHotelinfoDao, HtHotel> implements HtHotelinfoService {

    @Override
    public PageUtils sqlQueryPage(Map<String, Object> params) {
        IPage<HotelCityVO> page = new Query<HotelCityVO>().getPage(params);
        params.put("page", page);
        List<HotelCityVO> list = baseMapper.sqlQueryPage(params);
        return new PageUtils(page, list);
    }
}